xen/arm: Avoid open-coding the relinquish state machine
authorJulien Grall <julien@xen.org>
Sun, 19 Apr 2020 09:50:30 +0000 (10:50 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 21 Apr 2020 23:46:25 +0000 (16:46 -0700)
commit5730ac3c8346f56fe8ee90249cdcbdab2a4d5791
tree44b215c4423996bcb2dfdf2f2a23c65c22bcf253
parent0796cb907f2c31046427510a6da6f4941f678b76
xen/arm: Avoid open-coding the relinquish state machine

In commit 0dfffe01d5 "x86: Improve the efficiency of
domain_relinquish_resources()", the x86 version of the function has been
reworked to avoid open-coding the state machine and also add more
documentation.

Bring the Arm version on par with x86 by introducing a documented
PROGRESS() macro to avoid latent bugs and make the new PROG_* states
private to domain_relinquish_resources().

Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain.c
xen/include/asm-arm/domain.h